<template>
  <ul class="todo-list">
    <!-- completed: 完成的类名 -->
    <li :class="{completed:item.isDone === true}" v-for="item in isSelFn" :key='item.id'>
      <div class="view">
        <input class="toggle" type="checkbox" v-model='item.isDone'/>
        <label >{{item.name}}</label>
        <button class="destroy" @click="dellist(item.id)"></button>
      </div>
    </li>
  </ul>
  
</template>

<script>
import {mapGetters,mapMutations} from 'vuex'
export default {
  computed:{
     ...mapGetters({isSelFn:'add/isSelFn'})
  },
  methods:{
  ...mapMutations({dellist:'add/delList'})
  }
}
</script>
